import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import axios from './http'// 全局导入自定义的axios模块
import store from './store'

import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

Vue.use(VueQuillEditor);

import moment from "vue-moment"
Vue.use(moment); //实例

import animated from 'animate.css'
Vue.use(animated)

Vue.prototype.$axios = axios //让Vue实例对象使用axios

Vue.use(ElementUI)
Vue.config.productionTip = false

new Vue({
  router, store,
  render: h => h(App),
  //部署公交车
  beforeCreate() {
    Vue.prototype.$bus = this
  },
}).$mount('#app')

router.afterEach((to, from, next) => {
  window.scrollTo(0, 0)
});
